﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using MineDiscover.Interfaces;

namespace MineDiscover
{
    public class MapPainterBackupPanel : Panel
    {
        private Graphics gp;

        private ITileStyle[,] tileStyle;

        public MapPainterBackupPanel() : base() { }

        public MapPainterBackupPanel(MapMine map)
            : base()
        {
            BackColor = Color.Red;
            Dock = DockStyle.Fill;
            gp = CreateGraphics();
        }

        public void PaintMap()
        {
            int width = GameMineDiscover.GetInstance().Difficulty.Columns;
            int height = GameMineDiscover.GetInstance().Difficulty.Rows;

            tileStyle = new ITileStyle[width, height];

            //gp.FillRectangle(Brushes.Black, new Rectangle(new Point(0,0), new Size(100,100)));

            Size size = new Size(100, 100);
            Point point = new Point(100,100);
            for (int i = 0; i < width; i++)
            {
                for (int j = 0; j < height; j++)
                {
                    tileStyle[i,j] = TileFactory.GetInstance().GetTileStyle(TileStyle.TileDraw);
                    //tileStyle[i,j].OnPaint(gp, new Point(j*size.Width, i*size.Height), size);
                }
            }
        }
    }
}
